<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>配送范围</title>
<!-- 引入easyui 的主题样式  和  easyui 提供的图标样式 -->
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/themes/bootstrap/easyui.css" />
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/themes/icon.css" />
<!-- 引入jquery 和  easyui.js   中文设置js-->
<script type="text/javascript"
	src="${pageContext.request.contextPath}\js\jquery-1.9.1.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/easyui-lang-zh_CN.js"></script>
</head>
<script type="text/javascript">

$(function(){

	$('#dg').datagrid({    
	    url:'getAllDS',    
	    columns:[[
	        {field : 'ck',width : 100,checkbox : true},     
	        {field:'dsId',title:'配送范围编号',width:100,align:'center'},    
	        {field:'dpName',title:'配送点',width:100,align:'center'},    
	        {field:'dsName',title:'配送范围',width:250,align:'center'},   
	        {field:'dsDate',title:'配送时间',width:100,align:'center'},   
	        {field:'dsRemarks',title:'备注',width:400},  
	    ]]  ,
	rownumbers : true,
	pagePosition : 'bottom',
	pagination : true,
	pageSize : 10,
	pageList : [ 5, 10, 15 ],
	toolbar: '#tb'

	});
	$('#findDP').combobox({    
	    url:'findDp',    
	    valueField:'dpId',    
	    textField:'dpName',
	    prompt:"请选择配送点",
	    editable:false,
	}); 
	
	$('#yes').linkbutton({    
		onClick : function() {
			var dpName = $('#findDP').combobox('getValue');
			$('#dg').datagrid({
				url : 'findDS',
				queryParams : {
					'dpId' : dpName
				},

			})
			
		}
	});  
	
});

</script>
<body>
<table id="dg"></table>
<div id="tb">
<span>查找配送范围：</span><input id="findDP" > 
<a id="yes" href="#">确定</a> 
</div>

</body>
</html>